#ifndef CONTACTUSERLIST_H
#define CONTACTUSERLIST_H
#include"global.h"
#include<QListWidget>
#include<QEvent>
#include"conuseritem.h"
#include"grouptipitem.h"
class ConUserItem;

class ContactUserList:public QListWidget
{
    Q_OBJECT
public:
    ContactUserList(QWidget* parent=nullptr);
    void ShowRedPoint(bool bshow=true);
protected:
    bool eventFilter(QObject *object, QEvent *event)override;

private:
    void addContactUserList();
    bool _load_pending;

public slots:
    void slot_item_clicked(QListWidgetItem*item);
    void slot_add_auth_friend(std::shared_ptr<AuthInfo>);
    void slot_auth_rsp(std::shared_ptr<AuthRsp>);
signals:
    void sig_loading_contact_user();
    void sig_switch_apply_friend_page();
    void sig_switch_friend_info_page(std::shared_ptr<UserInfo>user_info);

private:
    ConUserItem* _add_friend_item;
    QListWidgetItem* _groupitem;


    std::vector<QString> strs = {
        "hello world!",
        "Great job on the presentation!",
        "Looking forward to the next update.",
        "Thanks for the helpful information.",
        "I appreciate your hard work on this.",
        "Can't wait to see what's next.",
        "Keep up the excellent work!",
        "I learned a lot from your post.",
        "Your insights are always valuable.",
        "The design is really impressive.",
        "I agree with your perspective on this issue.",
        "Your explanation made everything clear."
    };
    std::vector<QString> names = {
        "Wu",
        "Alice",
        "Bob",
        "Li",
        "David",
        "Zhang",
        "Eva",
        "Chen",
        "Frank",
        "Grace",
        "Liu"
    };
    std::vector<QString> heads = {
        ":/images/head_1.jpg",
        ":/images/head_2.jpg",
        ":/images/head_3.jpg",
        ":/images/head_4.jpg",
        ":/images/head_5.jpg",
        ":/images/head_6.jpg",
        ":/images/head_7.jpg",
        ":/images/head_8.jpg",
        ":/images/head_9.jpg",
        ":/images/head_12.jpg"
    };
};

#endif // CONTACTUSERLIST_H
